package util;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

/**
 * ShardPerferience工具类
 * author：wangqi on 2017/4/26 17:48
 * email：773630555@qq.com
 *
 * TOKEN
 *
 * LAT
 * LNG
 */
public class MySharePerference {
	
	public static void addSharePerference(Context context,String name,String value){
		SharedPreferences sp= context.getSharedPreferences("ZX",1);
		Editor editor = sp.edit();
		editor.putString(name,value);
		editor.commit();
	}
	public static String getShardPerferience(Context context,String name,String defaultValue){
		SharedPreferences sp= context.getSharedPreferences("ZX",1);
		return sp.getString(name, defaultValue);
	}
}
